<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:body>
        <ui:composition template="/WEB-INF/jsf2/templates/templateBasic.xhtml">
            <ui:define name="top">
                <ui:include src="/WEB-INF/jsf2/templates/templateNavigation.xhtml"/>
            </ui:define>
            <ui:define name="bottom">
                <ui:include src="/WEB-INF/jsf2/templates/templateBottom.xhtml"/>
            </ui:define>

            <ui:define name="content">
		<f:loadBundle basename="com.gq2.multilang.team" var="txt_tea"/>
		<f:loadBundle basename="com.gq2.multilang.granq" var="txt_com"/>

		<h3 align="left">
                    <h:outputFormat value="#{txt_tea.teamList}"/>
                </h3>

                <h:form id="teamList_form">
                    <h:inputHidden id="runAction" value="#{team.runAction}" />
                    <h:inputHidden id="keyId" value="#{team.teaId}"/>

                    <c:set var="teamList" value="#{team.teamList}" scope="session"/>

                    <table>
			<tr>
			    <td>
				<c:if test="#{team.rowCount == 0}">
				    <h3 align="left">#{txt_tea.NoListTeams}</h3>
				</c:if>
				<c:if test="#{team.rowCount > 0}">
				    <h:dataTable cellpadding="0px" cellspacing="0px"
						 columnClasses="col-center,col-left,col-left,col-center"
						 headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" 
						 value="#{team.teamList}"  var="currentRow" width="950pt">
					<h:column id="column2"> 
					    <h:outputText id="outputText3" value="#{currentRow['teaId']}"/>
					    <f:facet name="header">
						<h:outputText id="outputText4" value="#{txt_tea.Id}"/>
					    </f:facet>
					</h:column>
					<h:column id="column3">
					    <h:outputText id="outputText5" value="#{currentRow['teaCode']}"/>
					    <f:facet name="header">
						<h:outputText id="outputText6" value="#{txt_com.Code}"/>
					    </f:facet>
					</h:column>
					<h:column id="column4">
					    <h:outputText id="outputText7" value="#{currentRow['teaName']}"/>
					    <f:facet name="header">
						<h:outputText id="outputText8" value="#{txt_tea.TeamName}  "/>
					    </f:facet>
					</h:column>
					<h:column id="column11" headerClass="col-center">
					    <f:facet name="header">
						<h:outputText id="outputText21" value="#{txt_com.Action}"/>
					    </f:facet>
					    <h:commandButton action="#{team.edit(currentRow)}" id="button20" styleClass="button-short" 
							     value="#{txt_com.Edit}">
					    </h:commandButton>
					    <h:commandButton action="#{team.delete(currentRow)}" id="button21" styleClass="button-short" 
							     value="#{txt_com.Delete}">
					    </h:commandButton>
					</h:column>
				    </h:dataTable>
				</c:if>

			    </td>
			    <td>
				<table class="commandBoxInList">
				    <tr>
					<td>
					    <h:commandButton action="#{team.create}" value="#{txt_com.New}"/>
					</td>
				    </tr>
				    <tr>
					<td>
					    <h:commandButton action="#{team.search}" value="#{txt_com.Search}"/>
					</td>
				    </tr>
				</table>
			    </td>
			</tr>
                    </table>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>


</html>

